Skip to content

[Storage] Fixed live tests relating to File Share#47558

Merged
weirongw23-msft merged 3 commits into
Azure:mainfrom
weirongw23-msft:weirongw23/fix-share-lease-test
Jun 18, 2026
Merged

[Storage] Fixed live tests relating to File Share#47558
weirongw23-msft merged 3 commits into
Azure:mainfrom
weirongw23-msft:weirongw23/fix-share-lease-test

Conversation

@weirongw23-msft

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the Storage Storage Service (Queues, Blobs, Files) label Jun 18, 2026
@weirongw23-msft weirongw23-msft marked this pull request as ready for review June 18, 2026 18:48
Copilot AI review requested due to automatic review settings June 18, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a few File Share live tests in azure-storage-file-share that were flaky or non-deterministic when run against a real storage account containing pre-existing shares. The list-shares tests previously assumed the account had only the shares created by the test; the fixes scope assertions to the specific share(s) under test.

Changes:

  • Filter list_shares() results by the test's own share name in test_list_shares_leased_share (sync and async) and tighten the count assertion from >= 1 to == 1.
  • Remove a redundant share_names.sort() (commented-out in the sync test, active in the async test) in test_list_shares_with_num_results_and_marker, since the share names are already created in sorted order.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/storage/azure-storage-file-share/tests/test_share.py Scopes the leased-share list assertion to the test's share and removes a redundant commented-out sort.
sdk/storage/azure-storage-file-share/tests/test_share_async.py Mirrors the sync change: filters listed shares by name with == 1 assertion and drops the now-unnecessary share_names.sort().

@weirongw23-msft weirongw23-msft merged commit 15d9064 into Azure:main Jun 18, 2026
22 of 23 checks passed
@weirongw23-msft weirongw23-msft deleted the weirongw23/fix-share-lease-test branch June 18, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants